//
//  NRWCarDetailModel.m
//  NRWMall
//
//  Created by 张记 on 2018/6/13.
//  Copyright © 2018年 com.anpxd. All rights reserved.
//

#import "NRWCarDetailModel.h"

@implementation NRWCarDetailModel

@end

@implementation CarResult

+ (NSDictionary *)objectClassInArray{
    return @{@"carImages" : [CarCarimages class]};
}

-(NSString *)carMileageStr{
    if (self.carMileage  <= 0) {
        _carMileageStr = @"未输入里程";
    }else{
        if (self.carMileage < 0.1) {
            _carMileageStr = [NSString stringWithFormat:@"%.f公里", self.carMileage *10000];
        }else{
            _carMileageStr = [NSString stringWithFormat:@"%.2f万公里",self.carMileage];
        }
    }
    return _carMileageStr;
}
-(NSString *)onTheCardTiem{
    if (self.carLicenceState == 1) {
        _onTheCardTiem = [NSString stringWithFormat:@"%@",[NRWCarTurnTime timestampSwitchTime:self.carLicenceDate andFormatter:@"yyyy年MM月"]];
    }else if (self.carLicenceState == 2){
       _onTheCardTiem = @"未上牌";
    }else if (self.carLicenceState == 3 ){
        _onTheCardTiem = @"新车";
    }
    return _onTheCardTiem;
}
-(NSString *)priceStr{
    if (self.carRetailPrice <= 0) {
        _priceStr = @"价格面议";
    }else{
        _priceStr =[NSString stringWithFormat:@"￥ %.2f万",self.carRetailPrice];;
    }
    return _priceStr;
}
-(NSString *)carPurposeStr{
    if (self.carPurpose == 1 ) {
        _carPurposeStr = @"营运";
    }else if (self.carPurpose == 2){
        _carPurposeStr = @"非营运";

    }else if (self.carPurpose == 3){
        _carPurposeStr = @"营转非";

    }else{
        _carPurposeStr = @"--";
    }
    return _carPurposeStr;
}
@end
@implementation CarSeries

@end


@implementation CarBrand

@end




@implementation CarShop

@end


@implementation CarCartype

@end


@implementation CarRegion

@end


@implementation CarModel

@end



@implementation CarCarimages

- (NSString *)imageName{
    if ([self.imageKey isEqualToString:kImageLeft_anterior]) {
        _imageName = @"左前";
    }else if ([self.imageKey isEqualToString:kImageVin]){
        _imageName = @"车架号";
    }else if ([self.imageKey isEqualToString:kImageTyre]){
        _imageName = @"轮胎";
    }else if ([self.imageKey isEqualToString:kImageOdograph]){
        _imageName = @"里程表";
    }else if ([self.imageKey isEqualToString:kImageInsurance]){
        _imageName = @"保单";
    }else if ([self.imageKey isEqualToString:kImageEngine_bay]){
        _imageName = @"发动机";
    }else if ([self.imageKey isEqualToString:kImageGear_lever]){
        _imageName = @"变速档杆";
    }else if ([self.imageKey isEqualToString:kImageOpen_trunk]){
        _imageName = @"后备箱";
    }else if ([self.imageKey isEqualToString:kImageRight_rear]){
        _imageName = @"右后";
    }else if ([self.imageKey isEqualToString:kImageDriving_seat]){
        _imageName = @"驾驶座椅";
    }else if ([self.imageKey isEqualToString:kImageControl_booth]){
        _imageName = @"控制室";
    }else if ([self.imageKey isEqualToString:kImageVehicle_license]){
        _imageName = @"行驶证";
    }else if ([self.imageKey isEqualToString:kImageRegistration_license]){
        _imageName = @"登记证";
    }else{
        _imageName = @"其他";
    }    
    return _imageName;
}

@end

@implementation Carradarinfo

@end

@implementation CarUser

@end

@implementation CarMarket

@end

@implementation CarCity

@end
